<!DOCTYPE html>
<html lang="en">
<head>
<title>WebView4Delphi: uWVCoreWebView2ExecuteScriptResult: Class TCoreWebView2ExecuteScriptResult</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0-snapshot">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<span id="TCoreWebView2ExecuteScriptResult"></span><h1 class="cio">Class TCoreWebView2ExecuteScriptResult</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></div><div class="one_section"><a class="section" href="#PasDoc-Fields">Fields</a></div><div class="one_section"><a class="section" href="#PasDoc-Methods">Methods</a></div><div class="one_section"><a class="section" href="#PasDoc-Properties">Properties</a></div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="uWVCoreWebView2ExecuteScriptResult.html">uWVCoreWebView2ExecuteScriptResult</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TCoreWebView2ExecuteScriptResult = class(TObject)</code></p>
<h2 class="description">Description</h2>
<p>
 This is the result for ExecuteScriptWithResult. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2executescriptresult">https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2executescriptresult</a>&quot;&gt;See the ICoreWebView2ExecuteScriptResult article.)</p>
<span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TObject</li>
<li class="thisitem">TCoreWebView2ExecuteScriptResult</li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Fields"></span><h3 class="summary">Fields</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code><strong><a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#FBaseIntf">FBaseIntf</a></strong>: <a href="uWVTypeLibrary.ICoreWebView2ExecuteScriptResult.html">ICoreWebView2ExecuteScriptResult</a>;</code></td>
</tr>
</table>
<span id="PasDoc-Methods"></span><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#GetInitialized">GetInitialized</a></strong>: boolean;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#GetSucceeded">GetSucceeded</a></strong>: boolean;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#GetResultAsJson">GetResultAsJson</a></strong>: <a href="uWVTypes.html#wvstring">wvstring</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#GetException">GetException</a></strong>: <a href="uWVTypeLibrary.ICoreWebView2ScriptException.html">ICoreWebView2ScriptException</a>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <strong><a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#Create-ICoreWebView2ExecuteScriptResult-">Create</a></strong>(const aBaseIntf : <a href="uWVTypeLibrary.ICoreWebView2ExecuteScriptResult.html">ICoreWebView2ExecuteScriptResult</a>); reintroduce;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>destructor <strong><a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#Destroy">Destroy</a></strong>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#TryGetResultAsString-wvstring-boolean-">TryGetResultAsString</a></strong>(var stringResult: <a href="uWVTypes.html#wvstring">wvstring</a>; var value: boolean): boolean;</code></td>
</tr>
</table>
<span id="PasDoc-Properties"></span><h3 class="summary">Properties</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <strong><a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#Initialized">Initialized</a></strong>           : boolean                           read <a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#GetInitialized">GetInitialized</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <strong><a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#BaseIntf">BaseIntf</a></strong>              : <a href="uWVTypeLibrary.ICoreWebView2ExecuteScriptResult.html">ICoreWebView2ExecuteScriptResult</a>  read <a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#FBaseIntf">FBaseIntf</a>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <strong><a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#Succeeded_">Succeeded_</a></strong>            : boolean                           read <a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#GetSucceeded">GetSucceeded</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <strong><a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#ResultAsJson">ResultAsJson</a></strong>          : <a href="uWVTypes.html#wvstring">wvstring</a>                          read <a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#GetResultAsJson">GetResultAsJson</a>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <strong><a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#Exception">Exception</a></strong>             : <a href="uWVTypeLibrary.ICoreWebView2ScriptException.html">ICoreWebView2ScriptException</a>      read <a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#GetException">GetException</a>;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Fields</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="FBaseIntf"></span><code><strong>FBaseIntf</strong>: <a href="uWVTypeLibrary.ICoreWebView2ExecuteScriptResult.html">ICoreWebView2ExecuteScriptResult</a>;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="GetInitialized"></span><code>function <strong>GetInitialized</strong>: boolean;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="GetSucceeded"></span><code>function <strong>GetSucceeded</strong>: boolean;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="GetResultAsJson"></span><code>function <strong>GetResultAsJson</strong>: <a href="uWVTypes.html#wvstring">wvstring</a>;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="GetException"></span><code>function <strong>GetException</strong>: <a href="uWVTypeLibrary.ICoreWebView2ScriptException.html">ICoreWebView2ScriptException</a>;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Create-ICoreWebView2ExecuteScriptResult-"></span><code>constructor <strong>Create</strong>(const aBaseIntf : <a href="uWVTypeLibrary.ICoreWebView2ExecuteScriptResult.html">ICoreWebView2ExecuteScriptResult</a>); reintroduce;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Destroy"></span><code>destructor <strong>Destroy</strong>; override;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="TryGetResultAsString-wvstring-boolean-"></span><code>function <strong>TryGetResultAsString</strong>(var stringResult: <a href="uWVTypes.html#wvstring">wvstring</a>; var value: boolean): boolean;</code></td>
</tr>
<tr><td colspan="2">
<p>
 If Succeeded is true and the result of script execution is a string, this method provides the value of the string result, and we will get the `FALSE` var value when the js result is not string type. The return value description is as follows 1. S_OK: Execution succeeds. 2. E_POINTER: When the `stringResult` or `value` is nullptr. NOTE: If the `value` returns `FALSE`, the `stringResult` will be set to a empty string. </p>
</td></tr>
</table>
<h3 class="detail">Properties</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Initialized"></span><code>property <strong>Initialized</strong>           : boolean                           read <a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#GetInitialized">GetInitialized</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Returns true when the interface implemented by this class is fully initialized. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="BaseIntf"></span><code>property <strong>BaseIntf</strong>              : <a href="uWVTypeLibrary.ICoreWebView2ExecuteScriptResult.html">ICoreWebView2ExecuteScriptResult</a>  read <a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#FBaseIntf">FBaseIntf</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Returns the interface implemented by this class. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Succeeded_"></span><code>property <strong>Succeeded_</strong>            : boolean                           read <a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#GetSucceeded">GetSucceeded</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
 This property is true if ExecuteScriptWithResult successfully executed script with no unhandled exceptions and the result is available in the ResultAsJson property or via the TryGetResultAsString method. If it is false then the script execution had an unhandled exception which you can get via the Exception property. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="ResultAsJson"></span><code>property <strong>ResultAsJson</strong>          : <a href="uWVTypes.html#wvstring">wvstring</a>                          read <a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#GetResultAsJson">GetResultAsJson</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
 A function that has no explicit return value returns undefined. If the script that was run throws an unhandled exception, then the result is also &quot;null&quot;. This method is applied asynchronously. If the method is run before `ContentLoading`, the script will not be executed and the string &quot;null&quot; will be returned. The return value description is as follows 1. S_OK: Execution succeeds. 2. E_POINTER: When the `jsonResult` is nullptr. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Exception"></span><code>property <strong>Exception</strong>             : <a href="uWVTypeLibrary.ICoreWebView2ScriptException.html">ICoreWebView2ScriptException</a>      read <a href="uWVCoreWebView2ExecuteScriptResult.TCoreWebView2ExecuteScriptResult.html#GetException">GetException</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
 If Succeeded is false, you can use this property to get the unhandled exception thrown by script execution Note that due to the compatibility of the WinRT/.NET interface, S_OK will be returned even if the acquisition fails. We can determine whether the acquisition is successful by judging whether the `exception` is nullptr. </p>
</td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0-snapshot</a>. </em>
</span>
</body></html>
